import { RouteRecordRaw, RouterView } from 'vue-router'

//首页
const login = () => import(/* webpackChunkName: "homeIndex" */ '../view/common/login.vue')

const homeIndex = () => import(/* webpackChunkName: "homeIndex" */ '../view/common/index.vue')

// 自动添加好友
const autoAddBuddy = () => import(/* webpackChunkName: "autoAddBuddy" */ '../view/autoAddBuddy/index.vue')
const autoAddBuddyCreate = () => import(/* webpackChunkName: "autoAddBuddyCreate" */ '../view/autoAddBuddy/create/index.vue')
const autoAddBuddyTaskSetting = () => import(/* webpackChunkName: "autoAddBuddyTaskSetting" */ '../view/autoAddBuddy/taskSetting/index.vue')

// 加群好友
const addGroupBuddy = () => import(/* webpackChunkName: "addGroupBuddy" */ '../view/addGroupBuddy/index.vue')
const addGroupBuddyCreate = () => import(/* webpackChunkName: "addGroupBuddyCreate" */ '../view/addGroupBuddy/create/index.vue')
const addGroupBuddyTaskSetting = () => import(/* webpackChunkName: "addGroupBuddyTaskSetting" */ '../view/addGroupBuddy/taskSetting/index.vue')

// 无限群发
const infiniteSend = () => import(/* webpackChunkName: "infiniteSend" */ '../view/infiniteSend/index.vue')
const infiniteSendCreate = () => import(/* webpackChunkName: "infiniteSendCreate" */ '../view/infiniteSend/create/index.vue')
const infiniteSendTaskSetting = () => import(/* webpackChunkName: "infiniteSendTaskSetting" */ '../view/infiniteSend/taskSetting/index.vue')

// 发布群公告
const publishGroupNotice = () => import(/* webpackChunkName: "publishGroupNotice" */ '../view/publishGroupNotice/index.vue')
const publishGroupNoticeCreate = () => import(/* webpackChunkName: "publishGroupNotice" */ '../view/publishGroupNotice/create/index.vue')
const publishGroupNoticeTaskSetting = () => import(/* webpackChunkName: "publishGroupNoticeTaskSetting" */ '../view/publishGroupNotice/taskSetting/index.vue')


// 数据仪表盘
const dataDashboards = () => import(/* webpackChunkName: "dataDashboards" */ '../view/dataDashboards/index.vue')

// 群发监控助手
const groupMonitor = () => import(/* webpackChunkName: "groupMonitor" */ '../view/groupMonitor/index.vue')

// 智能回复
const smartReply = () => import(/* webpackChunkName: "smartReply" */ '../view/smartReply/index.vue')
const smartReplyCreate = () => import(/* webpackChunkName: "smartReply" */ '../view/smartReply/create/index.vue')

const NoPage = () => import(/* webpackChunkName: "common" */ '../view/common/404.vue')

const routes: Array<RouteRecordRaw> = [
  { path: '/', redirect: '/home' },
  {
    path: '/login',
    name: 'login',
    component: login,
    meta: { title: '登录' }
  },
  {
    path: '/home',
    name: 'home',
    component: homeIndex,
    meta: { title: '首页' }
  },
  // --------------------------------------------自动添加好友
  {
    path: '/auto-add-buddy',
    name: 'autoAddBuddy',
    component: autoAddBuddy,
    meta: { title: '自动添加好友' }
  },
  {
    path: '/auto-add-buddy/create',
    name: 'autoAddBuddyCreate',
    component: autoAddBuddyCreate,
    meta: { title: '新建任务' }
  },
  {
    path: '/auto-add-buddy/taskSetting',
    name: 'autoAddBuddyTaskSetting',
    component: autoAddBuddyTaskSetting,
    meta: { title: '任务设置' }
  },
  // --------------------------------------------加群好友
  {
    path: '/add-group-buddy',
    name: 'addGroupBuddy',
    component: addGroupBuddy,
    meta: { title: '加群好友' }
  },
  {
    path: '/add-group-buddy/create',
    name: 'addGroupBuddyCreate',
    component: addGroupBuddyCreate,
    meta: { title: '新建任务' }
  },
  {
    path: '/add-group-buddy/taskSetting',
    name: 'addGroupBuddyTaskSetting',
    component: addGroupBuddyTaskSetting,
    meta: { title: '任务设置' }
  },
  // --------------------------------------------无限群发
  {
    path: '/infinite-send',
    name: 'infiniteSend',
    component: infiniteSend,
    meta: { title: '无限群发' }
  },
  {
    path: '/infinite-send/create',
    name: 'infiniteSendCreate',
    component: infiniteSendCreate,
    meta: { title: '新建任务' }
  },
  {
    path: '/infinite-send/edit',
    name: 'infiniteSendEdit',
    component: infiniteSendCreate,
    meta: { title: '编辑任务' }
  },
  {
    path: '/infinite-send/taskSetting',
    name: 'infiniteSendTaskSetting',
    component: infiniteSendTaskSetting,
    meta: { title: ' 任务设置' }
  },
  {
    path: '/publishGroupNotice',
    name: 'publishGroupNotice',
    component: publishGroupNotice,
    meta: { title: '发布群公告' }
  },
  {
    path: '/publishGroupNotice/taskSetting',
    name: 'publishGroupNoticeTaskSetting',
    component: publishGroupNoticeTaskSetting,
    meta: { title: '任务设置' }
  },
  {
    path: '/publishGroupNotice/create',
    name: 'publishGroupNoticeCreate',
    component: publishGroupNoticeCreate,
    meta: { title: '新建任务' }
  },
  {
    path: '/publishGroupNotice/edit',
    name: 'publishGroupNoticeEdit',
    component: publishGroupNoticeCreate,
    meta: { title: '编辑任务' }
  },
  {
    path: '/dataDashboards',
    name: 'dataDashboards',
    component: dataDashboards,
    meta: { title: ' 数据仪表盘' }
  },
  {
    path: '/groupMonitor',
    name: 'groupMonitor',
    component: groupMonitor,
    meta: { title: ' 群发监控助手' }
  },
  // --------------------------------------------智能回复
  {
    path: '/smartReply',
    name: 'smartReply',
    component: smartReply,
    meta: { title: '智能回复' }
  },
  {
    path: '/smartReply/create',
    name: 'smartReplyCreate',
    component: smartReplyCreate,
    meta: { title: '新建规则' }
  },
  {
    path: '/smartReply/edit',
    name: 'smartReplyEdit',
    component: smartReplyCreate,
    meta: { title: '编辑规则' }
  }
]

export default routes
